//
//  QaDetailController.swift
//  flowerpot
//
//  Created by fyname on 15/10/15.
//  Copyright © 2015年 senhe. All rights reserved.
//

import UIKit

class QaDetailController: UIViewController {

    @IBOutlet weak var qaDetailTitle: UILabel!
    
    
    @IBOutlet weak var qaDetailText: UITextView!
    
    
    //接受传进来的值
    var detailItem: NSDictionary?
    
    
    override func viewDidLoad() {
        super.viewDidLoad()
        
        self.title = "提问详情"

        configureView()
        // Do any additional setup after loading the view.
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    

    
    func configureView() {
        if let detail : NSDictionary = self.detailItem {
            let title = detail.objectForKey("video_title") as? String
            let url : String = detail.objectForKey("video_img") as! String
            //let dataImg : NSData = NSData(contentsOfURL: NSURL(string : url)!)!
            //self.big_video_img.image = UIImage(data: dataImg)
            qaDetailTitle.text = title
            qaDetailText.text = url
        }
    }
    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
        // Get the new view controller using segue.destinationViewController.
        // Pass the selected object to the new view controller.
    }
    */

}
